package com.zhb.lkd.controller;


import com.zhb.lkd.base.PageDto;
import com.zhb.lkd.base.ResponseResult;
import com.zhb.lkd.service.IRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 用户角色表 前端控制器
 * </p>
 *
 * @author haibin
 * @since 2024-08-18
 */
@RestController
@RequestMapping("/api/user-service/role")
@Slf4j
@Api(tags = "角色相关接口")
public class RoleController {
    @Resource
    private IRoleService iRoleService;

    @GetMapping
    @ApiOperation("角色列表")
    public ResponseResult getAll(){
        log.info("角色列表");
        return ResponseResult.ok(iRoleService.list());
    }
}
